package cn.sieis.service.source;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.sieis.dao.SourceMapper;
import cn.sieis.pojo.Source;

@Service
public class SourceServiceImpl implements SourceService {

    @Autowired
    private SourceMapper sourceMapper;

    @Override
    public boolean addSource(Source source) {
        return sourceMapper.addSource(source);
    }

    @Override
    public List<Source> getSourceList() {
        return sourceMapper.getSourceList();
    }

    @Override
    public boolean deleteSourceById(Integer id) {
        return sourceMapper.deleteSourceById(id);
    }

    @Override
    public Source getSourceById(Integer id) {
        return sourceMapper.getSourceById(id);
    }
    @Override
    public Source getSourceByStrageId(String storageId) {
    	return sourceMapper.getSourceByFilePath(storageId);
    }
}
